package com.zhixinglu.www.spring.boot.protobuf.controller;

import com.zhixinglu.www.spring.boot.protobuf.protos.Poi;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * ProtobufController
 * </p>
 *
 * @author weixin
 * @date 2023/9/23 19:05
 */
@RestController
public class ProtobufController {

    @GetMapping("test")
    public String test(@RequestBody Poi poi) {
        return "person: " +
                poi.getPoiName() +
                poi.getScenicId();
    }

    public static void main(String[] args) {
        Poi.Builder builder = Poi.newBuilder();
        builder.setPoiName("张一博一号");
        
        System.out.println(builder.getPoiName());
    }

}
